package com.zzyx.service.impl;

import java.util.Collection;
import java.util.List;
import java.util.Map;

import org.hibernate.criterion.DetachedCriteria;

import com.zzyx.bean.Syscode;
import com.zzyx.dao.SyscodeDAO;
import com.zzyx.service.SyscodeService;

public class SyscodeServiceImpl implements SyscodeService {
	private SyscodeDAO syscodeDao;

	public SyscodeDAO getSyscodeDao() {
		return syscodeDao;
	}

	public void setSyscodeDao(SyscodeDAO syscodeDao) {
		this.syscodeDao = syscodeDao;
	}

	public void delete(Syscode entity) {
		syscodeDao.delete(entity);

	}

	public void deleteAll(Collection<Syscode> c) {
		syscodeDao.deleteAll(c);

	}

	public void deleteById(Class<Syscode> entityClass, String id) {
		syscodeDao.deleteById(entityClass, id);
	}

	public List<Syscode> findAll(Class<Syscode> entityClass) {
		return syscodeDao.findAll(entityClass);
	}

	public List<Syscode> findByAll(DetachedCriteria dc) {
		return syscodeDao.findByAll(dc);
	}

	public List<Syscode> findByCriteria(DetachedCriteria dc, int firstResult,
			int maxResult) {
		return syscodeDao.findByCriteria(dc, firstResult, maxResult);
	}

	public List<Syscode> findByCriteria(DetachedCriteria dc) {
		return syscodeDao.findByCriteria(dc);
	}

	public List<Syscode> findByHql(String hql, Map<String, Object> param,
			int firstResult, int maxResult) {
		return syscodeDao.findByHql(hql, param, firstResult, maxResult);
	}

	public Syscode findById(Class<Syscode> entityClass, String id) {
		return syscodeDao.findById(entityClass, id);
	}

	public List<Syscode> findByProperty(Class<Syscode> entityClass,
			String propertyName, Object value, int type) {
		return syscodeDao
				.findByProperty(entityClass, propertyName, value, type);
	}

	public Syscode findUniqueResult(String sql) {
		return syscodeDao.findUniqueResult(sql);
	}

	public void save(Syscode entity) {
		syscodeDao.save(entity);
	}

	public void saveOrUpdate(Syscode entity) {
		syscodeDao.saveOrUpdate(entity);

	}

	public void update(Collection<Syscode> c) {
		syscodeDao.update(c);

	}

	

}
